//
// C++ Interface: imageview
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
namespace xgui
{
	class Image;
    %feature("docstring","derives from :class:`xgui.WidgetClass` ") ImageViewClass;
	struct ImageViewClass : public xgui::WidgetClass
	{
		ImageViewClass();
		std::string const &className();
		bool isInstanceable();
		xgui::Object * create(xgui::Object * parent, xgui::StringMap &properties);
	};
    
    %feature("docstring","\n\nderives from :class:`xgui.Widget` \n\n**DESCRIPTION** sets a new image to display in the ImageView widget.\n\n**PROPERTIES**\n\n * **scrolled** *(RW)* if set to *\"1\"* the image is scrolled: only the portion of the image specified the *\"view-size\"* property is displayed and scrollbars have to used to scroll the image. if set to *\"0\"* the image is resized to fit the dimensions specified with the *\"view-size\"* property.\n\n * **view-size** *(RW)* sets or retireves the view size. The view size represents the visible portion of the image.\n\n * **image-path** *(RW)* sets or retrieves the path of the file containing the currently displayed image.\n\n * **alignment** *(RW)* sets or retrieves the image alignment in the imageview widget.It can be one of the follwing strings: *\"top-left\", \"top\", \"top-right\", \"left\", \"center\", \"right\", \"bottom-left\", \"bottom\", \"bottom-right\".Default: \"center\"*\n\n**EVENTS**\n\nnone\n\n**METHODS**\n\n") ImageView;
	class ImageView : public xgui::Widget
	{
		protected:
			ImageView ( xgui::Container * parent, xgui::Image * img );
			virtual ~ImageView();

		public:
		    %feature("docstring","returns the image that the ImageView widget is currently displaying.\n\n*C++*::\n\n xgui::Image * getImage(); \n\n") getImage;
			xgui::Image * getImage();
			%feature("docstring","sets a new image to display in the ImageView widget.\n\n*C++*::\n\n void setImage ( xgui::Image * img ); \n\n") setImage;
			void setImage ( xgui::Image * img );
			%feature("docstring","returns a pair of integers representing the view size of the image (the view size represents the visible portion of the image).\n\n*C++*::\n\n std::pair<int, int> getViewSize(); \n\n") pair;
			std::pair<int, int> getViewSize();
			%feature("docstring","returns true if the image is scrolled, false if the image is resized to fit the view size.\nsee also the \"scrolled\" property.\n\n*C++*::\n\n bool isScrolled();\n\n") isScrolled;
			bool isScrolled();
	};
}

%extend xgui::ImageView {
	%pythoncode {
		def __del__(self):
			if self.valid: self.delPyOwner(self)
	}
}		

